package com.yanyi.security.auth.service;

import java.util.List;

/**
 * @author: yukong
 * @date: 2018/7/25 18:50
 * @description:
 */
public interface AuthClientService {

    public String apply(String clientId, String secret) throws Exception;

    /**
     * 获取授权的客户端列表
     * @param serviceId
     * @param secret
     * @return
     */
    public List<String> getAllowedClient(String serviceId, String secret);

    /**
     * 获取服务授权的客户端列表
     * @param serviceId
     * @return
     */
    public List<String> getAllowedClient(String serviceId);

    /**
     * 注册服务
     */
    public void registryClient();

    /**
     * 校验
     * @param clientId
     * @param secret
     * @throws Exception
     */
    public void validate(String clientId, String secret) throws Exception;

}
